const http = require('http');
const io = require('socket.io');
const fs =require('fs');

let httpServer = http.createServer();
httpServer.listen(8080);
let wsServer = io.listen(httpServer);
wsServer.on('connection',(sock)=>{
    sock.emit('t',new Date());//发送

    // sock.on(); // 接收
});